const HISTORY_KEY = 'history_list'
export const setItem = (obj) => {
  localStorage.setItem('info', JSON.stringify(obj))
}
export const getItem = () => {
  const res = localStorage.getItem('info')
  return res
}
export const removeItem = () => {
  localStorage.removeItem('info')
}

export const setHistoryList = (arr) => {
  localStorage.setItem(HISTORY_KEY, JSON.stringify(arr))
}
export const getHistoryList = () => {
  return JSON.parse(localStorage.getItem(HISTORY_KEY)) || []
}
